<?php

/**
 * @Author: wuchenge
 * @Date: 2020-11-30 15:37:25
 * @email: ligui0506@sina.com
 * @descript: 测试控制器
 */

namespace App\Http\Controllers;

use App\Libraries\Token;
use Illuminate\Http\Request;
use Response;

class TestController extends ApiController
{
    public function index()
    {
        $token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJTSEEyNTYifQ.eyJpc3MiOiJhcHBXaXRoV3VjaGVuZ2UiLCJpYXQiOjE2MDY3MjIzNzAsImV4cCI6MTYwNzMyNzE3MCwidGVzdCI6InRlc3QiLCJhZG1pbiI6ImFkbWluIiwiYSI6eyJiIjoiYiJ9fQ.7902b9bb67c81650f8f56d8246efaf50f327c61e1c663d62f9be34ecc83a4c74';
        $data  = Token::verifyToken($token);
        dd($data);
        $data = [
            'test'  => 'test',
            'admin' => 'admin',
            'a'     => [
                'b' => 'b',
            ],
        ];

        $token = Token::createToken($data);

        return $token;
    }
}
